import http from './http'
// 轮播图
const getCarouselList = () => {
    return http.get('/api/Carousel/getCarouselList', {
        headers: { act: 'getCarouselList' }
    })
}
// 最新公告
const getNotice = () => {
    return http.get('/api/Notice/getNotice', {
        headers: { act: 'getNotice' }
    })
}

// 获取分类
const getCourseList = (id) => {
    return http.post(
        '/api/CourseApi/getCourseList',
        { classify_id: id },
        { headers: { act: 'userLogin' } }
    )
}
// 根据不同id获取下方详情数据 
const getCateVideo = (id,limit,page) => {
    return http.post(
        '/api/CourseApi/getCateVideo',
        { course_id: id, limit,page  },
        { headers: { act: 'getVideoDetail' } }
    )
}

// 精品视频获取
const getGoodsVide = (limit,page) => {
    return http.post(
        '/api/courseApi/getGoodsVide',
        {limit,page},
        { headers: { act: 'getGoodsVide' } }
    )
}
export {
    getCarouselList,
    getNotice,
    getCourseList,
    getCateVideo,
    getGoodsVide
}